package ln.javatest.day05.Demo01;
/*
注意：
当时用一个对象类型作为方法的返回值时，返回值其实就是对象的地址值。
*/

public class getPhone {
    public static void main(String[] args) {
        Phone two = getPhone();
        System.out.println(two.brand); //苹果
        System.out.println(two.price); //89.0
        System.out.println(two.color); //白色
    }
    public static Phone getPhone(){
        Phone one = new Phone();
        one.brand = "苹果";
        one.price = 89;
        one.color = "白色";
        return one;
    }
}
